package com.swizipuremvc.app.user.mediators
{
	import com.swizipuremvc.core.common.NoteType;
	
	import mx.controls.Alert;
	
	import org.puremvc.as3.multicore.patterns.mediator.AbstractMediator;
	import org.puremvc.as3.multicore.patterns.observer.Notification;
	
	public class DashboardMediator extends AbstractMediator
	{
		public override function initialize(key:String, mediatorName:String=null, viewComponent:Object=null, scopeName:String=null):void
		{
			this.initializeNotifier(key);
			super.initialize(key,mediatorName,viewComponent,scopeName);
		}
		public override function initializeNoteHandlers():void
		{
			
			this.setNoteHandler(NoteType.LOGON_RESULT_RECEIVE_HANDLER,logonResultReceiveHandler);
			
		}
		
		private function logonResultReceiveHandler(notification:Notification):void
		{
			var data:Object = notification.getBody();
			Alert.show("Logon successful for " + data.user);
		}
	}
}